import {createApp} from 'vue'
import {createPinia} from 'pinia'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'
import './assets/fonts/iconfont/iconfont.css'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 引入tiptap-element
import {ElementTiptapPlugin} from 'element-tiptap';
import 'element-tiptap/lib/style.css';

const app = createApp(App)
const pinia = createPinia()

// 全局注册
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus).use(router).use(pinia).use(ElementTiptapPlugin, {
    lang: 'zh',
}).mount('#app')
